package com.xxx.util;

import java.util.List;

/**
 * 分页信息类
 * 
 * 
 * 
 */
public class Page<T> {

	private int pageSize; // 每页显示记录数
	private int totalCount; // 总记录数
	private int totalPage; // 总页数
	private int currentPage = 1; // 当前页
	private int beginIndex; // 查询起始点
	private boolean hasPrePage; // 是否有上一页
	private boolean hasNextPage; // 是否有下一页
	private List<T> list; // 数据集合

	public synchronized List<T> getList() {
		return (List<T>) list;
	}

	public synchronized void setList(List<T> list) {
		this.list = (List<T>) list;
	}

	public Page() {
		super();

	}

	public Page(int pageSize, int totalCount, int totalPage, int currentPage, int beginIndex, boolean hasPrePage,
			boolean hasNextPage) {
		this.pageSize = pageSize;
		this.totalCount = totalCount;
		this.totalPage = totalPage;
		this.currentPage = currentPage;
		this.beginIndex = beginIndex;
		this.hasPrePage = hasPrePage;
		this.hasNextPage = hasNextPage;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}

	public int getTotalPage() {
		return totalPage;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}

	public int getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}

	public int getBeginIndex() {
		return beginIndex;
	}

	public void setBeginIndex(int beginIndex) {
		this.beginIndex = beginIndex;
	}

	public boolean isHasPrePage() {
		return hasPrePage;
	}

	public void setHasPrePage(boolean hasPrePage) {
		this.hasPrePage = hasPrePage;
	}

	public boolean isHasNextPage() {
		return hasNextPage;
	}

	public void setHasNextPage(boolean hasNextPage) {
		this.hasNextPage = hasNextPage;
	}
}
